|
|
|
|
|
|
|
Examples Filename: Email.frm |
|
|
|
|
|
|
|
|
Lets create a form that can be used to send email to another employee. |
|
|
|
|
| Create an Email Form 1. Create a form that looks like Figure 5.2. 2. Add four text boxes as shown. 3. Be sure to set the MultiLine property to True and the ScrollBars property to 2-Vertical for the Message text box. 4. Add two command buttons as shown. 5. Add the Unload Me statement under each of the command buttons. 6. Set the TabIndex properties so that the tab order starts with the first text box and continues in order to the last command button. |  | This exercise gave you an example of how easy it is to put together a form using some of the techniques you have learned in this book so far. |
|
|
|
|
|
|
The image control is exactly like the picture control. You would write the same events for this control as for the picture control. |
|
|
|
|
|
|
|
|
A list box has many events you can respond to. Most commonly, youll use the Click() event and the ItemCheck() event. |
|
|
|
|
|
|
|
|
The ListBox_Click( ) Event |
|
|
|
|
|
|
|
|
The Click() event occurs whenever the user clicks an item in the list box. You can use this event to retrieve the value of the item clicked. Heres an example: |
|
|
|
 |
|
|
|
|
Private Sub lstHealth_Click()
MsgBox "The Item Selected Is " & _
lstHealth.List(lstHealth.ListIndex)
End Sub |
|
|
|
|
|